package com.erp.pur.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.erp.pur.dao.GroupDao;
import com.erp.pur.domain.GroupDO;
import com.erp.pur.service.GroupService;



@Service
public class GroupServiceImpl implements GroupService {
	@Autowired
	private GroupDao groupDao;
	
	@Override
	public GroupDO get(Long id){
		return groupDao.get(id);
	}
	
	@Override
	public List<GroupDO> list(Map<String, Object> map){
		return groupDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return groupDao.count(map);
	}
	
	@Override
	public int save(GroupDO group){
		return groupDao.save(group);
	}
	
	@Override
	public int update(GroupDO group){
		return groupDao.update(group);
	}
	
	@Override
	public int remove(Long id){
		return groupDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return groupDao.batchRemove(ids);
	}

	@Override
	public int updatePaymentPrice(Long id, BigDecimal paymentPrice) {
		return groupDao.updatePaymentPrice(id,paymentPrice);
	}

	@Override
	public GroupDO getByGroupid(String groupid) {
		return groupDao.getByGroupid(groupid);
	}

	@Override
	public int confirm(Long id){
		return groupDao.confirm(id);
	}

	@Override
	public GroupDO getAllPriceBySupplierId(Long id) {
		return groupDao.getAllPriceBySupplierId(id);
	}

	@Override
	public int updateinvoicePrice(Long purId, Double tickAmount) {
		return groupDao.updateinvoicePrice(purId,tickAmount);
	}

	@Override
	public int updateoutstockPrice(Long purId, BigDecimal outstockPrice) {
		return groupDao.updateoutstockPrice(purId,outstockPrice);
	}

}
